package com.bupt.algorithm;

import com.bupt.basic.IBasicNetWork;
import com.bupt.basic.Project;
import com.bupt.exception.BaseException;
import com.bupt.model.Limit;

import java.util.List;

public interface TrafficRouteAlgorithm {
    /**
     * 没有必经节点计算业务路由，D算法
     * @param links
     * @param nodes
     * @param fromNode
     * @param toNode
     * @return
     */
    List<IBasicNetWork.BasicLink> findNoMust(Project project, List<IBasicNetWork.BasicLink> links, List<IBasicNetWork.BasicNode> nodes, IBasicNetWork.BasicNode fromNode, IBasicNetWork.BasicNode toNode) throws BaseException;

    /**
     * 有一个必经节点的业务路由，D算法
     * @param links
     * @param nodes
     * @param fromNode
     * @param toNode
     * @return
     */
    List<IBasicNetWork.BasicLink> findOneMust(Project project,List<IBasicNetWork.BasicLink> links,List<IBasicNetWork.BasicNode> nodes,IBasicNetWork.BasicNode fromNode,IBasicNetWork.BasicNode toNode,IBasicNetWork.BasicNode mustNode) throws BaseException;

    /**
     * 有必经节点的路由
     * @param links
     * @param nodes
     * @param fromNode
     * @param toNode
     * @param type
     * @param mustNodes
     * @param limits
     * @return
     */
    List<IBasicNetWork.BasicLink> find(Project project,List<IBasicNetWork.BasicLink> links,List<IBasicNetWork.BasicNode> nodes,IBasicNetWork.BasicNode fromNode,IBasicNetWork.BasicNode toNode,String type,List<IBasicNetWork.BasicNode> mustNodes,List<Limit> limits) throws BaseException;
}
